<!DOCTYPE html>
	<head>
		<meta charset="utf-8">
		<title>标题</title>
	</head>
	<body>
		


		<script>
			function ApiPostForm(url, params, stringify = true) {
			  return new Promise((resolve, reject) => {
			    let data = params;
			    if(stringify) {
			      data = qs.stringify(params);
			    }
			    instance({
			      url,
			      method: 'post',
			      headers: {
			        'content-type': 'application/x-www-form-urlencoded'
			      },
			      data: data,
			      responseType: 'json',
			      withCredentials: true, //允许跨域携带cookit
			    }).then(res => {
			      resolve(res);
			    }).catch(err => {
			      if (err.msg) {
			        notification.error({
			          message: '提示',
			          description: err.msg
			        });
			      }
			      reject(err);
			    });
			  });
			}


			// 使用方法 --------
			let params = new URLSearchParams();
			for(let key in _d.table.selected) {
				params.append('ids[]', _d.table.selected[key]);
			}
			params.append('constructionId', _d.id);
			params.append('type', _d.detail.typeField);

			ApiPostForm(BOOT_BASE+"constructionInform/equipmentInvalid", params, false).then(res => {
				if(res.data.success) {
					notification.success({
						message: '提示',
						description: res.data.msg
					})
					emit('reload');
					_d.visible = false;
				}
			})

		</script>
	</body>
</html>